package com.wu.ssm.spring.ioc;

import com.wu.ssm.spring.annotion.IAspect;
import com.wu.ssm.spring.utils.ClassUtil;

import java.util.Map;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;


/**
 * Created by wzf on 2018/11/28/028.
 */
public class AnnotationConfigApplicationContext {

    /**此Map容器用于存储类定义对象*/
    private Map<String, Class<?>> beanDefinationFacotry=new ConcurrentHashMap<>();
    /**此Map容器用于存储单例对象*/
    private Map<String,Object> singletonbeanFactory=new ConcurrentHashMap<>();

    static {
        initBeanMap("com.wu.ssm");
    }

    public static void initBeanMap(String basePath) {
        Set<Class<?>> classSet = ClassUtil.getClassSet(basePath);

        for (Class<?> clazz:classSet) {
            if(clazz.isAnnotationPresent(IAspect.class)) {
            }
        }
    }
}
